<div class="lv-multi-autocomplete-wrapper" #multiAutocomplete [style.maxHeight]="maxHeight">
  <div class="lv-multi-autocomplete-content">
    <span #multiAutocompleteLint class="lv-multi-autocomplete-lint">{{ value }}</span>
    <div class="lv-multi-autocomplete-placeholder">{{ dataEmpty && inputEmpty ? lvPlaceholder : '' }}</div>
    <!-- Tag 展示区 -->
    <div class="lv-multi-autocomplete-valuearea">
      <lv-tag
        style="width: 100%"
        [(ngModel)]="tagData"
        [lvExtraContent]="inputTpl"
        [lvTagTemplate]="lvTagTemplate"
        (lvRemove)="removeTag($event)"
        (lvClearAll)="clearAllTags()"
      ></lv-tag>
    </div>
    <!-- 拖拽标识 -->
    <div *ngIf="lvResize" #resizeHandle class="lv-resize-handle"></div>
  </div>

  <!-- Autocomplete 输入框 -->
  <ng-template #inputTpl>
    <input
      #autocomplete="lvAutocomplete"
      lv-input
      [maxlength]="lvMaxLength"
      lv-autocomplete
      class="lv-multi-autocomplete-textarea"
      [ngStyle]="{
        width: inputWidth + 'px',
        'max-width': el.nativeElement.clientWidth - 12 + 'px'
      }"
      [(ngModel)]="value"
      [lvAutocompleteData]="lvData || []"
      [lvAutocompleteOrigin]="el"
      [lvAutocompleteLoading]="lvLoading"
      [lvAutocompleteLabelTemplate]="lvLabelTemplate"
      [lvAutocompleteShowNoData]="lvShowNoData"
      [lvAutocompleteNoDataTemplate]="lvNoDataTemplate"
      [lvAutocompletePosition]="lvPosition"
      [lvAutocompleteWidth]="lvPanelWidth"
      [lvAutocompletePanelClass]="lvPanelClass"
      [lvAutocompleteHighlightContent]="value"
      [lvAutocompleteScroll]="lvScroll"
      [lvAutocompleteVirtualScroll]="lvVirtualScroll"
      [lvAutocompleteVirtualItemSize]="lvVirtualItemSize"
      [lvAutocompleteVirtualMaxBuffer]="lvVirtualMaxBuffer"
      [lvAutocompleteVirtualMinBuffer]="lvVirtualMinBuffer"
      [lvAutocompleteTrackBy]="lvTrackBy"
      [attr.disabled]="lvDisabled || null"
      (lvAutocompleteInputChange)="inputChange($event)"
      (lvAutocompleteSelectedChange)="selectedChange($event)"
      (lvAutocompleteEnterEvent)="enterEvent($event)"
      (lvAutocompleteScrollEnd)="lvScrollEnd.emit($event)"
      (lvAutocompleteScrollingChange)="lvScrollingChange.emit($event)"
      (compositionstart)="onCompositionstart()"
      (compositionend)="onCompositionend()"
      #inputArea
    />
  </ng-template>
</div>
